window.loadImage = (src) ->
  defer = new window.mq.Defer()
  img = new Image
  img.src = src
  img.onload = () ->
    defer.resolve img
  return defer